home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
001a
/
tlxjwpc5.zip
/
EXECPC.SLT
< prev
next >
Wrap
Text File
|
1990-09-21
|
5KB
|
161 lines
//╔═════════════════════════════════════════════════════════════════════╗
//║ RBBS 17.3A JW-PC Consulting DataFlex.HST (608)837-1923 ║
//║ Dual Std HST/V.32/MNP5/V.42 RBBSnet 8:972/2 FIDOnet 1:121/8 ║
//╚═════════════════════════════════════════════════════════════════════╝
///////////////////////////// EXEC.SLT ///////////////////////////////////
// By Jim Wargula, Sysop JW-PC Consulting DataFlex.HST (608)837-1923
// 09-21-90 8:972/2 and 1:121/8
// This is a sample script for logging on to EXEC-PC of Milwaukee, WI.
// The logon questions are handled in any order, and optional prompts are ok.
// Capture file is opened for new files. BBSname displayed on Status line.
str first_name[] = "Jim";
str last_name[] = "Wargula";
// Put YOUR name in the above lines. The script will get the proper password
// stored in your Telix dialing directory.
// (Telix puts that password in the script system variable called _entry_pass).
// Before using this script for the first time, or when you make a change,
// type 'cs exec' at the DOS prompt to compile the script for use by Telix.
//////////////////////////////////////////////////////////////////////////////
// globals
//
// used by showname():
//
int statline = 24; // Telix status line row
int statback = 7; // status line background color
int statfore = 0; // status line foreground color
//////////////////////////////////////////////////////////////////////////////
// main routine
//
main()
{
alarm (1);
int stat;
int t1, t2, t3, t4, t5, t6, t7, t8, t9;
int tmark;
alarm(1); // connect!
showname();
if (not _entry_pass) // no pass, so didn't recog. board
{
prints ("Sorry, I don't know the password for this BBS!");
return;
}
t1 = track ("FIRST name ->", 1);
t2 = track ("LAST name ->", 1);
t3 = track ("Password ->", 1);
t4 = track ("L=list again) ->", 1);
t5 = track ("<F>ile", 1);
t6 = track ("<A> DUC Mahoney", 1);
t7 = track ("<N>ew", 1);
tmark = timer_start (1800); // wait up to 3 minutes for login Part I
//////////////////////////////////////////////////////////////////////////////
// Loop - Login, check new files (capture in file).
//
while (not time_up (tmark))
{
terminal(); // let Telix process any chars and keys
stat = track_hit (0); // see which (if any) track was hit
if (stat == t1) // send name and password
{
cputs (first_name);
cputs ("^M");
}
else if (stat == t2)
{
cputs (last_name);
cputs ("^M");
}
else if (stat == t3)
{
delay (2);
cputs (_entry_pass); // send password
cputs("^M");
}
else if (stat == t4) // bulletins
{
cputs ("^M");
}
else if (stat == t5) // Files
{
cputs ("F");
}
else if (stat == t6) // A collection
{
cputs ("A");
}
else if (stat == t7) // New files
{
cputs ("N");
if (capture("exec.cap") == -1)
prints("Error opening EXEC.CAP capture file...");
break;
}
}
//////////////////////////////////////////////////////////////////////////////
// End - Clean-up
//
if (time_up (tmark))
{
prints ("Loop failed!");
return;
}
timer_free (tmark); // free timer channel
track_free (0); // and all track channels
alarm (5); // sound alarm, we're there!
}
//////////////////////////////////////////////////////////////////////////////
// Function: showname
// Description: Displays the name of the system you're connected to, or
// "Alt-Z for Help" if you're not connected to anything.
//
// You can plug this into ANY logon script file, just call it
// as shown in main().
//
// This routine will overwrite the "Alt-Z for Help" message,
// but I think it's worth it. If you don't like this feature,
// set the Anonymous option in SLCONFIG to 'y' (YES).
// Parameters: none
// Returns: nothing
//
showname()
{
str name[14]; // name to display
int x, y; // old cursor position
x = getx(); // save current position
y = gety(); //
substr(_entry_name, 0, 14, name); // get the current BBS name
if ((strlen(name) == 0) || (! carrier())) // no name or not connected?
name = "Alt-Z for Help"; // then display help message
strcat(name, " "); // pad name with spaces
pstraxy( name, 1, statline, // display it
(statback * 16) + statfore
);
gotoxy(x, y); // return to saved position
}